package com.jeff.tianti.cms.service;

import com.jeff.tianti.cms.dao.AwardRecordDao;
import com.jeff.tianti.cms.dao.CertificateDao;
import com.jeff.tianti.cms.dto.AwardRecordQueryDTO;
import com.jeff.tianti.cms.dto.CertificateQueryDTO;
import com.jeff.tianti.cms.dto.font.PrizeFontDTO;
import com.jeff.tianti.cms.entity.AwardRecord;
import com.jeff.tianti.cms.entity.Certificate;
import com.jeff.tianti.common.entity.PageModel;
import com.jeff.tianti.common.service.CommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AwardRecordService extends CommonService<AwardRecord, String> {
    @Autowired
    private AwardRecordDao awardRecordDao;

    @Autowired
    public void setCertificateDao(AwardRecordDao awardRecordDao){
        super.setCommonDao(awardRecordDao);
    }

    public PageModel<AwardRecord> queryCertificatePage(AwardRecordQueryDTO awardRecordQueryDTO){
        return this.awardRecordDao.queryAwardRecordPage(awardRecordQueryDTO);
    }
    public int updateSelective(AwardRecord awardRecord) {
        return  awardRecordDao.updateSelectiveById(awardRecord);
    }

    public List<AwardRecord> queryAwardRecordPage(PrizeFontDTO prizeFontDTO){
        return this.awardRecordDao.queryAwardRecordPage(prizeFontDTO);
    }
}
